{include file="public/header" /}





<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>退货管理</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="{$Think.lang.sc_explanation_tip}">{$Think.lang.sc_explanation}</h4>
            <span id="explanationZoom" title="{$Think.lang.sc_explanation_close}" class="arrow"></span>
        </div>
        <ul>
            <li>买家提交申请，平台确认后，退款金额以余额的形式返还给买家（充值卡部分只能退回到充值卡余额）。</li>
        </ul>
    </div>
    <form method="get">
        <div class="sc-search-form">
            <dl>
                <dt>
                    <select name="type">
                        <option value="order_sn" {if condition="$Request.param.type eq 'order_sn'"}selected{/if}>{$Think.lang.refund_order_ordersn}</option>
                        <option value="refund_sn" {if condition="$Request.param.type eq 'refund_sn'"}selected{/if}>{$Think.lang.refund_order_refundsn}</option>
                        <option value="goods_name" {if condition="$Request.param.type eq 'goods_name'"}selected{/if}>商品名称</option>
                        <option value="buyer_name" {if condition="$Request.param.type eq 'buyer_name'"}selected{/if}>{$Think.lang.refund_order_buyer}</option>
                    </select>
                </dt>
                <dd><input type="text" class="text" name="key" value="{$Request.param.key}" /></dd>
            </dl>
            <dl>
                <dt>退款原因</dt>
                <dd>
                    {sctaglib:dcselect list="$refundreason_list" id="refundreason_list" class="w-100" name="reason_id" value="$Request.get.reason_id" default="全部" /}
                </dd>
            </dl>
            <dl>
                <dt>代理商</dt>
                <dd>
                    <input type="text" class="text w150" name="inviter_name" value="{$Request.param.inviter_name}">
                </dd>
            </dl>
            <dl>
                <dt>收货人</dt>
                <dd>
                    <input type="text" class="text w150" name="reciver_name" value="{$Request.param.reciver_name}">
                </dd>
            </dl>
            <dl>
                <dt>收货人电话</dt>
                <dd>
                    <input type="text" class="text w150" name="reciver_mobile" value="{$Request.param.reciver_mobile}">
                </dd>
            </dl>
            <dl>
                <dt>申请时间</dt>
                <dd><input class="txt date" type="text" value="{$Request.param.add_time_from}" id="add_time_from" name="add_time_from">
                    ~
                    <input class="txt date" type="text" value="{$Request.param.add_time_to}" id="add_time_to" name="add_time_to"/></dd>
            </dl>
            <div class="btn_group">
                <input type="submit" class="btn" value="搜索">
                {if $filtered}
                <a href="{:url('Returnmanage/return_manage')}" class="btn btn-default" title="{$Think.lang.sc_cancel}">{$Think.lang.sc_cancel}</a>
                {/if}
            </div>
        </div>
    </form>
    
    <table class="sc-default-table">
        <thead>
            <tr class="thead">
                <th>{$Think.lang.refund_order_ordersn}</th>
                <th>{$Think.lang.return_order_returnsn}</th>
                <th>商品名称</th>
                <th>{$Think.lang.refund_order_buyer}</th>
                <th class="align-center">{$Think.lang.refund_buyer_add_time}</th>
                <th class="align-center">{$Think.lang.refund_order_refund}</th>
                <th class="align-center">{$Think.lang.return_order_return}</th>
                <th class="align-center">处理进度</th>
                <th class="align-center">{$Think.lang.sc_handle}</th>
            </tr>
        </thead>
        {notempty name="return_list"}
        <tbody>
            {foreach name="return_list" item="val" key="key" }
            <tr class="bd-line" >
                <td> <a href="javascript:scLayerOpen('{:url('Order/show_order',['order_id'=>$val.order_id])}','查看实物订单-{$val.order_sn}')"><i class="fa"></i>{$val.order_sn}</a></td>
                <td>{$val.refund_sn}</td>
                <td>{$val.goods_name}</td>
                <td>
                    <a href="{:url('Member/member',['member_id' => $val.buyer_id])}">{$val.buyer_name}</a>
                </td>
                <td class="align-center">{$val.add_time|date="Y-m-d H:i:s",###}</td>
                <td class="align-center">{$val.refund_amount}</td>
                <td class="align-center">{if $val.return_type == 2}{$val.goods_num}{else/}无{/if}</td>

                <td class="align-center">{$val.refund_state|dict_convert="order_refund_process",###}</td>

                <td class="align-center">
                    {if $val.examine_type == 1}
                    <span>
                        <a href="javascript:scLayerOpen('{:url('Returnmanage/edit',['refund_id'=>$val.refund_id])}','审核订单-{$val.order_sn}')" class="dsui-btn-add"><i class="fa"></i>审核</a>
                    </span>
                    {else /}
                    <span>
                        <a href="javascript:scLayerOpen('{:url('Returnmanage/view',['refund_id'=>$val.refund_id])}','查看订单-{$val.order_sn}')" class="dsui-btn-view"><i class="fa"></i>查看</a>
                    </span>
                    {/if}
                    {if $val.examine_type == 2 && $val.return_type == 2 && $val.examine_type == 2 && $val.goods_state == 2}
                    <span>
                        <a href="javascript:scLayerOpen('{:url('Returnmanage/receive',['refund_id'=>$val.refund_id])}','收货订单-{$val.order_sn}')" class="dsui-btn-edit"><i class="fa"></i>收货</a>
                    </span>
                    {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
        {else/}
        <tbody>
            <tr class="no_data">
                <td colspan="20">{$Think.lang.no_record}</td>
            </tr>
        </tbody>
        {/notempty}
    </table>
    {$show_page}

<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
